import React from "react";

class TableList extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div className="row">
        <div className="col-md-12">
          <table className="table table-striped table-bordered">
            <thead>
              <tr>
                {
                    this.props.tableHeads.map((v,index) => (
                        <th key={index} style={{textAlign:"center"}}>{v}</th>
                    ))
                }
              </tr>
            </thead>
            <tbody>
                {this.props.children}
            </tbody>
          </table>
        </div>
      </div>
    );
  }
}

export default TableList;
